<?xml version="1.0" encoding="utf-8"?>
<Content xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:blueonionsoftware-com:bloget:runtime:data">
  <text>&lt;p&gt;Sometimes you work harder than you have to. I've written several forms of exception display dialogs and it always struck me as more complex than it should be.  Well it isn't if you just read the documentation (Duh!)&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Exception.ToString()&lt;/b&gt; gives you the most important information you want from an Exception&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The exception type&lt;/li&gt;
&lt;li&gt;The exception message&lt;/li&gt;

&lt;li&gt;The stack trace.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In addition, Exception.ToString() will give you information about any exception contained in the &lt;i&gt;InnerException&lt;/i&gt; property automatically. In fact, information for all inner exceptions is displayed. So, instead of logging Exception.Message, log Exception.ToString().&lt;/p&gt;

&lt;p&gt;Tip 2: Here's a simple way to display an exception in a message box.&lt;/p&gt;
&lt;blockquote&gt;MessageBox.Show(this, exception.ToString(), this.ToString());&lt;/blockquote&gt;
&lt;br /&gt;
&lt;p&gt;&lt;b&gt;this.ToString()&lt;/b&gt; displays the module that caught the exception. A nice little extra.&lt;/p&gt;

&lt;img src ="http://flounder_aaeng/blogs/devnotes/aggbug/246.aspx" width = "1" height = "1" /&gt;</text>
  <last_update>2007-10-04T00:51:49.4540806Z</last_update>
  <source_title />
  <source_link />
  <comments />
  <references />
  <attachments />
</Content>